﻿using Google.Apis.Auth.OAuth2.Flows;
using Google.Apis.Auth.OAuth2.Mvc;
using Google.Apis.Auth.OAuth2.Requests;
using Google.Apis.Auth.OAuth2.Responses;
using Google.Apis.Auth.OAuth2.Web;
using Google.Apis.Drive.v2;
using Google.Apis.Drive.v2.Data;
using Google.Apis.Services;
using Google.Apis.Util.Store;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace CloudStorageLight.Core
{
    [ExcludeFromCodeCoverage]
    internal class AppFlowMetadata : FlowMetadata
    {
        string userId;
        string callbackUrl;

        public AppFlowMetadata(string userId, string clientId, string clientSecret, string callbackUrl, IAuthorizationCodeFlow flow)
        {
            this.userId = userId;
            this.callbackUrl = callbackUrl;

            this.flow = flow;


        }
        private IAuthorizationCodeFlow flow;


        public override string GetUserId(System.Web.Mvc.Controller controller)
        {

            return userId;
        }

        public override string AuthCallback
        {
            get
            {
                return callbackUrl; // 
            }
        }

        public override IAuthorizationCodeFlow Flow
        {
            get { return flow; }
        }
    }

}
